/*
 * @Author: thinker_cy
 * @Date: 2025-11-04 09:54:48
 * @FilePath: \weimai-admin\src\api\mainpart\index.js
 * @Description: 
 */
import request from '@/config/axios'

// 首页板块 API
export const MainPartApi = {
  // 查询首页板块分页
  getMainPartPage: async (params) => {
    return await request.get(`/main-part/page`, { params })
  },

  // 查询首页板块详情
  getMainPart: async (id) => {
    return await request.get(`/main-part/get?id=` + id)
  },

  // 新增首页板块
  createMainPart: async (data) => {
    return await request.post(`/main-part/create`, data)
  },

  // 修改首页板块
  updateMainPart: async (data) => {
    return await request.post(`/main-part/update`, data)
  },

  // 删除首页板块
  deleteMainPart: async (id) => {
    return await request.delete(`/main-part/delete?id=` + id)
  },

  // 导出首页板块 Excel
  exportMainPart: async (params) => {
    return await request.get(`/main-part/export-excel`, { params })
  },
}